#region <!--##session UserProfileWholeClass##-->
	
		/*<!--##
		codeGeneratorVariable_DisplayCode.Append(GeneralUsing() + Environment.NewLine);
		##-->*/
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EXtremecode.PresentationLayer;
using EXtremecode.Common.UI;
namespace <!--##=RepositoryManager.Instance.Repository.ProjectName##-->
{
		/*<!--##
		 codeGeneratorVariable_DisplayCode.Append(UserProfile() + Environment.NewLine);
		##-->*/
}
	
<!--##/session##-->
#endregion

#region <!--##session UserProfile##-->
	public class UserProfile : IUserProfile
	{

		private UserProfile(){}
		public static UserProfile Instance
		{
			get
			{
				UserProfile instance = SessionRepository.Instance.UserProfile as UserProfile;
				if (instance == null)
				{
					instance = new UserProfile();
					lock (instance)
					{
						SessionRepository.Instance.UserProfile = instance;
					}
				}
				return instance;
			}
		}
		public static void Initialize()
		{
			UserProfile urserProfile = Instance;

			//initialize here.
		}

        

		#region IUserProfile Members

		IDecorator decorator = null;
		public IDecorator Decorator
		{
			get
			{
				if (decorator == null)
				{
					//default decorator
					decorator = new XcodeDecorator();
				}
				return decorator;
			}
			set
			{
				decorator = value;
			}
		}

		private IUser user;
		public  IUser User
		{
			get
			{
				if (user == null)
				{
					//default user
                    
				}
				return user;
			}
			set
			{
				user = value;
			}
		}

		#endregion
	}

<!--##/session##-->
#endregion



